Add mkdir error handling.