Fix error running pre-up hook outside of repo