The Kindle has many flaws, but it does allow you to read a few different non-DRM formats.
DRM is not to prevent other files from being readable on the Kindle.
The Kindle is already able to read more than just Amazon DRMed content, it can handle a number of formats.
The Kindle supports Mobipocket files directly. You don't need to write a script to do that.
A revolutionary portable reader that wirelessly downloads books, newspapers, magazines and blogs to a crisp, high-resolution electronic paper display that looks and reads like real paper, even in bright sunlight.