Removes extra spaces from resulting Capfile
Fixes gsub_file with heredoc, and require Env error.