Make sure scripts in imports with unicode characters are kept in the correct encoding

Fixes Polymer/polymer#498

add test for unicode scripts