Changed the mode arg from an int to a mode_t.