Fixed problems with no write access in folders

The problem might not be fixed, as some weird code thing is there but it
still seems to work.  More testing will come later to guarentee that it
is fixed.