Trim final newline from copied filename(s)

Prevents problem opening a single file when pasting the filename into
VIM.