Check that there's only one file before redirecting

it was catching when there was only one dist.

fixes #1226.