Remove empty strings from the split path to stop path.join resolving the cwd.