Sanitise the named root directory.

Fixes #50