Check return code of mmap (bug reported by Nick Bane)