fix issue #51: unlink() must consider permissions of directory where file is inside, not of the file to unlink itself