Fixed sector erase issue: pages are 0-indexed. This also fixes a bug with large file upload.