Fix support for accessat(2) and fchmodat(2): they have only 3 parameters, not 4.

For faccessat(2) and fchmodat(2) syscalls, the fourth parameter is
*not* used by the kernel, only the libc uses it.  As a consequence,
PRoot shall ignore this flag.

This bug was exposed by the following command:

    proot -S stage3-amd64-hardened+nomultilib-20140710 emerge util-linux

when Gentoo's sandbox is enabled.
Set $PWD to the value specified by the -w option, for the sake of consistency.

Quote:

  Some lines of shells are sometimes better than lengthly explainations:

    $ mkdir -p /tmp/a
    $ cd /tmp/a
    $ proot -b /tmp/a:/test -w /test bash -c 'pwd'
    /tmp/a

  This should output `/test`. It seems that the directory change is
  not done is this particular case. It indeed does if the current working
  directory is different than the one being bind-mounted:

    $ mkdir -p /tmp/a
    $ cd /tmp
    $ proot -b /tmp/a:/test -w /test bash -c 'pwd'
    /test

  -- Jérémy Bobbio https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756935

As of my understanding, the Bash "pwd" builtin returns the content of
$PWD as-is when both the inode of "." and the inode of $PWD are the
same:

  $ mkdir -p /tmp/a/b
  $ cd /tmp/a
  $ env PWD=/tmp/a/b/.. proot -b /tmp/a:/test -w /test bash -c 'pwd'
  /tmp/a/b/..

This is the case when $PWD is bind-mounted to the path specified by
the -w argument. A workaround was to unset PWD before starting
PRoot. The solution is to make PRoot set PWD to the path specified by
the -w argument.

Reported-by: Jérémy Bobbio <lunar@debian.org>
Ref: https://github.com/cedric-vincent/PRoot/issues/64
Fix a portability issue in test-dddddddd.sh on Debian-based systems.

The "-e" option of realpath does not exist on Debian-based systems but
it doesn't return a failure...

Reported-by: Rémi Duraffort <remi.duraffort@st.com>
Prepare release of PRoot v4.0.1.
Fix typo: s/Rémy/Rémi/