v46: Fixed a potential crash in the replaceAsm function

When the patched function address is the tail of memory page, the
patched code touches two pages. so we must make the two pages writable.

Fixes #3.