Add check that dist directory isn't empty
Refactor to only push after commits

Fixes #17