Adds systemd support

Necessary for running this on operating systems that use systemd, and operating systems that change to systemd. Tested with systemd, needs testing to make sure upstart still works.