было after a verb means ‘nearly’.
забрался было ‘nearly climbed’, ‘was on the point of climbing’.

мол — a colloquial expression meaning ‘according to smb’s words’
«…мол, куда, по траве не ходить» means that he said «Куда?! По траве не ходить!» ‘Where [are you going]?! Don’t walk on the grass!’
(«Куда?!» is a quite unceremonious expression meaning ‘You are not allowed to go there!’.)