Move portable code to shared code folder and update build folders
Add support for reading and writing images