The main question is: what exactly lays outside the sandbox? A good thing to search for could be Cydia, but there are alternative package managers. MobileSubstrate isn't a sure bet either, but I suppose it's a far cry safer than Cydia. An additional method could be trying to map a page you can both write to and execute, which should fail unless specific kernel patches indicative of a jailbreak have been applied (or you're a webview with Nitro enabled.)
The best method, however, is to not care, because if you do it's for the sake of either tracking/analytics or screwing over your users.
Less than half a millisecond?
Nit: I'm almost certain that they checked for MobileSubstrate.
Although I've definitely had non pirate users report this error to me because they've drag and dropped the app onto another machine instead of reinstalling from the App Store -- so you're right, it's not a guarantee that they're a pirate in an absolute sense.
The correct way to check if your app has been pirated requires two steps:
1) You must be running on a jailbroken system. Check this by trying to read from outside the sandbox.
2) Check if your app's signature is invalid. Checking this is fairly involved. Look around for code.
If either of these two are false, then you've not been pirated (point (2) will be true when your app is checked by Apple but point (1) will be false).
For Mac App Store apps, only point (2) is required.
The author of the app in the article has only checked point (1) (and additionally checked an irrelevant point by checking for Installous).
Incidentally, the preferred action if you've detected a pirate situation is to exit(173).