Allow linking files with newlines in their name
This also includes all other kinds of crazy characters.
This is the (hopefully) proper implementation of what was attempted in 5a45ce8d but reverted in acc8c2d0