Fix server error when my_user contains garbage.
Close file handles after writing.
Merge branch 'master' into user-save

* master:
Update my_user dir when a new user is saved.
Merge pull request #16 from vole/api-support-for-is-my-user

Fix server error when my_user contains garbage.
Merge branch 'master' into user-save

* master:
  Fix server error when my_user contains garbage.
Small code cleanup.
Merge pull request #17 from vole/user-save

Close file handles. Update my_user file when a new user is created.
Merge branch 'master' into create-profile