fix for path.join error on null filename