Updating Karma Config to work with updated Karma

Karma now requires config to be returned as a function, updating code
to do so.