increased buffer size for friendly_pose sprintf
changed check for MAX_CONTEXTS order and added check in print loop
Merge pull request #1 from stwirth/master

Fix for buffer overflow contributed by Stephan Wirth (Universitat de les Illes Balears/Willow Garage).