SI-4829 the :load command now fails claiming a file does not exist if the command ends with a space

The :load command now tries to be smart by detecting the presence of trailing spaces that might be insignificant.

On certain file systems, files with trailing whitespaces are permitted which is why we don't naievely trim the argument.
Refactor the code to avoid duplication and separate concerns
Fix minor error with splitLeft
Merge pull request #2710 from jedesah/repl_load

SI-4829 the :load command now fails if the command ends with a space