Save file data before it is wiped by `gp_file_free`, fixes #29
Refactored the creation of the node.js buffer
Merge pull request #47 from lpinca/fix/corrupted-image-file

Fix corrupted image file
Fixes #29