Fix setFileMode() to actually set chmod instead of trying to create directories