Handle invalid encodings

Previously, there was a bug where files that were encoded as something
other than UTF-8 could cause the buildpack to fail.  This change
handles those cases.