Removed need of python-magic. Updated testcases accordingly