Implement util.realpath

Relative to [koreader#237](https://github.com/koreader/koreader/pull/237). I think it is right, please review @hwhw. The behavior differs a little from `FileChooser:compressPath` because it returns `nil` if the path does not exist. However, should not be a problem for the current usage of the function.