Added sem-failed?
Added test.scm example, fixed a bug in sem-getvalue.