Revert "remove legacy sys.path magic test code (#1339)"

This reverts commit f63e095ab2d6804846501e0ac808bdf9388d2678.
not everyone likes murdering os and sys

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>