Make it actually work

S_IFMT is a function in python, not a bitmask