Updated magrathea script test to cope with deprecation of the `imp` module for Python versions >= 3.4