Fixed file writing to config files

Fixed a bug where a configfile that was smaller than the previous file
would have the last bytes of the previous file appended to the new
file.
Merge pull request #34 from Rubykuby/configfix

Fixed file writing to config files