Fix: exit code of calling `ls` on a non-existent entry on MacOS is different from that on Linux

On MacOS, the exit code of calling `ls` on a non-existent entry returns 1, instead of 2 as on Linux.

```bash
~/Projects/shell.py (master ✔ ) > uname -a
Darwin qiao.local 13.1.0 Darwin Kernel Version 13.1.0: Wed Apr  2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64
~/Projects/shell.py (master ✔ ) > ls asfasfasdf
ls: asfasfasdf: No such file or directory
~/Projects/shell.py (master ✔ ) > echo $?
1
```

Also, `assertEquals` is deprecated; use `assertEqual` instead :)