Updates for a faster 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. 
 - Linking files with a newline is not actually fixed, but the
   behavior did change slightly, so I updated the test.