A rare first edition of Harry Potter almost tossed in the trash sold for £21,000 after being discovered with a misprint.