Refactored the mkdir system call and a status message added