boundary and validity checks enhanced

kvmem_err method to pass errors added
Reading and writing /dev/mem support
More dumb test added and TODO