Make certain that path is relative before joining it to relativeTo

This should fix the pathing logic for the File handler on Windows based systems.

Fixes #1545