Updated CLI to allow output specification. Fixed bug where it failed if folders already existed