Add directory check before plugin installation