adding redirection

redirect errors if no permissions on directories.
This will happen a lot with flexy or smarty compile or cache
directories.