An exception above would prevent the file from being removed. Maybe put this in a `try`/`finally` block or make `write_pgpass` into a context manager to be used with the `with` statement?