Associate ASCII_8BIT encoding if filename is invalid US_ASCII

Fixes the build failures on Travis for OS X.