Paths file processing

careful! this is text mode by default. It will translate linefeed characters -- if you use the same mode on output (you do here) then it will translate them back, which most of the time will be fine -- but if you have binary data that happens to have a byte that matches a line feed, then you could get garbage. And with io.open, text mode is unicode, so could get even uglier if it's a binary file or a weird encoding. Better to use binary mode for this kind of thing:

``
sourcefile = io.open(source_name, 'rb')
destfile = io.open(destination_name, 'wb')
``