Added a fix for pathing issues when calling the script from outside it's dir