refactored LandscapePortraitUtils to pull out getFileExtension into
helper method, and added unit tests