Removed dependency on python-magic since it caused dependency issues on Mac OS X. Updated user data test to use subprocess module