Fixed codegen

* Removed unnecessary and deprecated `~` in `get_writer()`
* Switched to `FilePermission` values for `mkdir_recursive`
Merge pull request #99 from dpx-infinity/master

Fixed codegen