simplify (a little) prepare_files
simplify and comment build_location/correct_build_location