Fixed STUDIO-4389 (example not propagating)

Fixed STUDIO-4389 (example not propagated with build method) and refacto...r to use IOUtils in both code and test