Fix failed saving a image without extension refs #21