Fix issue in Safari on OSX when pasting bare strings.

Your code uses the W3 Paste API which is unfortunately not implemented uniformly across browsers. In Safari on OSX, the `items` property is not set when pasting bare strings (like URLs), rather the only way to get the data is to pass the appropriate MIME type (`text/plain`) to `DataTransfer.getData`. The changed line produced an error because the `items` property is undefined on Safari when you are only pasting a string rather than a file.