I'd say your file ./batch/rename_database.sql
was created with a unicode byte-order mark. psql
doesn't like this. Remove the BOM and try again.
I quote the linked article:
The UTF-8 representation of the BOM is the byte sequence 0xEF,0xBB,0xBF. A text editor or web browser interpreting the text as ISO-8859-1 or CP1252 will display the characters  for this.