Fixed issue PA-401
 - Added test for invalid rotation
 - Added default case to image rotation
Altered rotation function
 - Case 5 and 7 were not functioning as intended