Tweaked relative path detection to fix #1.