The previous method of checking if an rcp transmission was successful had many false
negative results (a file would actually transmit successfully, but we would think the
transmission had failed). That method involved using the return value of system()
and the errno variable. Now we are using conditional bash statements to echo to a file.

system("rcp filename ...  && echo 1 > .testFile")
If and only if the rcp command had no errors will the echo command happen).

We can't use enironmental variables since system() opens up a new bash shell (new process)
and it has its own environment.