Fix relative paths and supply env default to script