Added unit tests for rm.c