Ensure w is a row vector.
Merge pull request #1094 from chebfun/hotfix-barymat

Ensure w is a row vector.