fix relative check on empty pathname