fix vertcat changing the dimension of pptrajectories and add a test

This should fix #559