Safe mode unreasonably limits things like creating directories and reading files from within them (based on its UID limits). Strictly speaking, there are workarounds, but they involve chown'ing files and that's not really something to get into. The cruxt is that safe_mode is not a recommended PHP setting any more; security solutions should be looked at via a lower-level method (eg, phpsuexec).