Allow users to pass a file extension when opening an image