Fix parameter issue in call to write_profile_info and host check, use
relative paths instead as the build_dir is a temp dir + some cleanup