Fixes potential issues with cwd when running script from a different location