Fixed scripts to run in their own directory even when called from elsewhere