Suppress warnings when trying chmod on a directory in mkdir() method