Fix leaks, and replace continue statements with if/else.
Fix leaks, and replace continue statements with if/else.

Compare UTI instead of using isEqualToString: with path extension.

JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim