Fixed syntax error. Added mkdir functionality.