Bug fixes in cur_line() and boundary flag.

Previously, ghe boundary flag was never being reset, resulting in an all black image. This was fixed which unearthed a second bug: cur_line() and prev_line(), helper functions for sending the correct pixel values, would wrap around to LINES_STORED, which was used as a max index for a 3D array. The issue was fixed by adding '-1'.