Extract the static `readFile`, `readModule`, and `setRootDirectory` functions from main.c into a new io module, replacing the fixed-size `rootDirectory` array with a heap-allocated pointer and adding the corresponding header with public declarations.