- Ensured the name variable get's set from the directory name if no name is passed.