Automatically determine output directory name from the current directory name.