A study of the valence shell photoionisation dynamics of pyrimidine and pyrazine