Check that the created directory is a valid PFN

Signed-off-by: Petr Tesarik <petr@tesarici.cz>