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

Changed to use a more BASH friendly method where it solely
relies on PWD and cd to ascertain the correct path
Works on OSX.