image_name_ok_as_dir(): Don't allow names of '.' and '..'