play nice with non-empty SCRIPT_NAME
Merge pull request #60 from smmckay/develop

play nice with non-empty SCRIPT_NAME