Fix checkstyle.
Fix javadoc warnings.
Introduce method to create file permissions.