worker and client with different user can write to the temp folder. 

1. added the methods of changing file permission to CommonUtils.
2. changed the permissions of both the temp folder and new blocks.