Better filetype detection

This takes a smarter approach to determining the file type so we don't barf all over the place when dealing with data that should be sent to shopify as binary data.

This fixes #85 

Please review @maartenvg 

/cc @jduff @tylerball 
Is this something we can do only once, instead each and every time a file is checked?