Sanitize namespace identifiers

Fixes #35
Please write a more descriptive error message