Some script plugin hotfixes

Added fold line, and fixed double duplicates on ctrl+D.
Merge pull request #12 from fatcerberus/master

More bugs squashed