Adds thumbnail handling for other file types, fixes bug where grid view was being loaded when it wasn't currently displayed. Fixes bug where missing file could cause php error.