Changed baseframe.py and test_frames.py.
1. Added string parsing and validation to the preferred_representation setter in baseframe.py. Thanks to Cadair for the basestring hint.
2. Added tests for preferred_representation getter and setter in test_frames.py