Support for trigram files

Can now import path structures from files containing trigrams of the
form a,b,c
Merged support for trigram files