Add psr-4 detection when building a namespace

It's been a fair few year since I have used Python (back in the 2.6 days) so my apologies if this is poor quality code.

This fixes #9 that I opened previously.