Fixed codegen

* Removed unnecessary and deprecated `~` in `get_writer()`
* Switched to `FilePermission` values for `mkdir_recursive`
fix compile error under newest rust
rm unnecessary owned conversion
Merge pull request #99 from dpx-infinity/master

Fixed codegen
Merge pull request #100 from andelf/update-for-newest-rust

fix compile error under newest rust
Merge branch 'master' of https://github.com/AngryLawyer/rust-sdl2