Adds transaction management for new paste.

- Checks for empty formsets.
- Adds new exception EmptyFormSet