Bidirectional beam propagation method based on the method of lines for the analysis of photonic band gap structures