possible fix for path.commonPrefix issue (#330)