added support for brushes, fixed directory permissions bug