Pull request for mega-test on Mac OS X (and NetBSD)

This supports contributors who use Mac OS X (recognizably, they are legion) by increasing the mega-test's shell and Unix utility portability. Presumably this will resolve issue #236.

Not having a Mac, and since Mac OS X was developed ultimately from BSD Unix, I developed these changes on an Amazon AWS instance running NetBSD (version 6.0).

Now, the mega-test successfully completes, both in the NetBSD shell (much different from BASH) on NetBSD, and in BASH on Linux. Generally, this should increase its portability and improve its operability (presumably) on Mac OS X.

Naturally, however, the mega-test cannot succeed if any Rails Example App repository already (currently) contains a failing test.

The tests for gem r_a_c continue to pass as well, both for NetBSD and Linux.

References:
[Mac OS X history](http://en.wikipedia.org/w/index.php?title=OS_X&oldid=565555321#History)
[NeXTSTEP description](http://en.wikipedia.org/w/index.php?title=NeXTSTEP&oldid=564657111#Description)