Resolves Issue #30

Changed to use a more BASH friendly method where it solely
relies on PWD and cd to ascertain the correct path
Works on OSX.
Merge pull request #34 from rbuckland/master

Fix #30 Uses a script detection that works on OSX as well as Linux