Bug Fix: substitute spaces by dashes regex to support relative directories

The previous `let word = substitute(word, '[ /]', '-', 'g')` command was
undesirably modifying relative links to have a '-' as the path
delimiter. For example [[Link description|path/to/link.markdown]] was
being changed to [[Link description|some-path-file.markdown]] the
substitute command now respects nested files.