How to select bytea data as binary data, inserted as hex-encoded from binary
You're not going to get binary data out of psql and SELECT. psql will format it for readability.  You could try something with lo_export similar to the answer in How to insert (file) data into a PostgreSQL bytea column to get the data written to a file.

However, most PostgreSQL client adapters (perl DBI, Ruby 'pg', etc) can give you the data in binary when you SELECT bytea columns.  Just write a little program using an appropriate adapter in the language of your choice.