[#669] Raise NotFound if group is not found in member_list.

Allows a proper error to be generated in the API
controller instead of just giving a 500 error.
[#669] Tidy up imports