Add mkdir_and_follow function.