Fix file saving.

The app threw a segfault when we saved a file.
This was due to the fact that we didn't deal with the
return variable of write_file method which was freed
causing the segfault. Adding unowned to the bindings
method fix the issue. This closes #8.