Switch to an abstraction for disk operations

Open/Close/Read/Write are done through a generic function that can be
replaced per-arch and even inside the arch if needed.