Harry Potter author JK Rowling has said it was demand from the young wizard's fans that prompted her to publish her latest work.