this is too useful to leave down in the version control library; it
turns the Nth pipe status into the current return value, allowing
simpler and more readable checking of status.
abstracted from version control library into core functions file.
also dropping the two test files for checkin.