Port movepages.py from compat

Change-Id: I15f82347cc7f9111aafe328b6cd60fb32d5f25d3
PEP8-ify movepages.py

Change-Id: I6d776ba34ac05999302f14adb606261d7de8275d
Merge changes I6d776ba3,I15f82347

* changes:
  PEP8-ify movepages.py
  Port movepages.py from compat