Bug fix to handle symlinked db/media files