make sure the paths and cwd are handled properly