Path traversal fix.

Fixes path traversal by removing forward slashes (/) from $gallery.