Fix image viewer for name with spaces
Use code editor as fallback for files #159