Allow for arrays with a mix of strings and regexps when converting paths.