Fixing segfault/infinite recursion when there's a directory in the media paths that the webserver doesn't have +x permission on; it will be ignored silently for now - maybe worth logging into the server log a warning or similiar at some point?