Bug fix - creat() should open the file with the correct flags.

In addition, EROFS is returned instead of EACCESS now.