CommonJS file: implements makeTree() and removeTree()

Fixed also makeDirectory: it should not create inexisting parent directories
as indicated in the CommonJS spec