Made metadata image paths relative too.
Moved some path functions into Util.h/.cpp.