usually, this kind of problems come from the fact that, when nrpe executes a plugin, it has none of your env. variables.
This means that all your relative paths (ie: ../my_dir) won't work.
All your $HOME or else variables may not work either (except if you have them in the .profile of your nrpe user).
Anyway, have a look with this in mind.
If you can't find such errors, don't hesitate to post your script; we may help you further with that info ^^