Preserves the "php-ish-ness" of the script.

Addresses issue #1249 - preserves the ability to include() and require() the
script to sub-set its functionality, as well as enabling execution by the
PHP binary.