Fix #115: Speed up the link command.

 - Don't store intermediate `paths` variable; use pipes.
 - Use process substitution to speed up loops.
 - Minor clean-up & fix a few shellcheck warnings.

1 test re: Fail on newline in filename does *NOT* pass.
Is this behavior we need to keep?
I am pretty sure I added this because a test was broken.  Strangely, it only showed up after moving to the process substitution / read while loop; I made sure everything was passing before.