Remove UTF-8 BOMs and clean up trailing whitespace

The BOMs (Byte Order Marks) at the beginning of Ruby files caused errors on Puppet 3.4.