Added better detection of absolute path to script / deps