FIX: Import bug was introduced in fit_powerlaw. Add test.

I'm not sure what change broke this -- I think it was a change in `api.py` -- but now there's a test to be sure we don't break it again.