Guess output file name if none specified.