Move errors module to the lib directory.