Refactor Q/imagepicker tool and add Streams/canWriteToPath checks