Make CLI work cross-platform

The usage of distutils scripts make it hard to use, since this requires the platform to understand shebangs. Using entry_points and console_scripts makes it work also on windows (where pip will compile an .exe to use).