Fix memory limit checking under Linux

Bug was found in SeattleMeshnet/meshbox#6.

From http://man7.org/linux/man-pages/man2/mmap.2.html :
```
ERRORS:
EINVAL - flags contained neither MAP_PRIVATE or MAP_SHARED, or contained both of these values.
```
So I added MAP_PRIVATE.

Also improved error messages.