Allow for a returncode to be set

This allows for a unix style return code to be set on function
calls, this allows for functions to set a failure relative to the
function call itself. AKA, this can flag a failed highstate
and flag it with a mapping to a specific defined value