Gallery: only send paths to client instead of json encoding all the fileinfo

makes the resulting json about 3-4 times smaller