MINOR: Fixed locking & locking-tests (for Windows)

File is locked if not readable or not lockable if readable and writeable