Added upload-directory subcommand with better sync functionality