Retain file between prepare and marshal phases

Fixes #4
Merge pull request #8 from kanongil/handle-file-changes-fix

Use open file descriptors to retain file between prepare and marshal phases