Don't assume paths are set

Both from and/or to can be nothing (when fed plain content
instead of reading from a file, or when just returning content
instead of writing to new file)

In those cases, realpath() wouldn't make sense and would just
return the `pwd`, converting paths relative to whatever PHP
script is running.