Small fixes for access test.
Added access logic for file-type-dependent permissions.