Add env#namespace assertion

to ensure paths before the generator name is removed when resolving namespace