Fix for issue where 'theme download' breaks for some files

CRLF replacement with .gsub() raises an error with some utf-8 files.
This temporary fix wraps the statement in a rescue block in case the
string replacement doesn't go through. Behavior is unchanged for non-
offending files.