add template documentation
fix module available bug with longpath names
not always assume contents in test