Fixed a stupid oversight

Creation of directories now checks filename validity again