handle signals
make sure plugin directory exists