Refactor macos

Fixes the sues in Pull Request #2
Removes Ubuntu assumptions.
Adds kindle support.
Fixes an image directory bug.

Please review in case I missed anything else. Sorry for the bogus request earlier.