vec_for_bone gives you the position of a bone, this should help, but I didn't try it myself:
http://www.conitec.net/beta/avec_for_bone.htm