Made sure dir exists when copying library, added better logging & error
handling.