G105de: Bugfix: write attributes to file
G105de: Bugfix: use WIN32 macro
G105de: Fixes #16, Fixes #13: writing character files