Improved file access check in inputInaccessibleTest and isAccessibleFile.