Make sure chdir and mkdir pass on their return value.