Clean up bash-isms
Only create one backup file