added fix allowing multiple mkdir commands in pipe