Fixes security issues with JS injection in error messages.
Default folders in home directories are now created.
Fixes #245.