direction parser gets new initialization function, for use in jsonconf later. add unit tests for directions.