Make sure input_dir is not empty.