Allow file upload in markdown editor

I've added some JavaScript / PHP to allow file upload with your plugin.
The PHP code is almost exactly the same as the official WYSIWG Editor (from Question2Answers) so it should be safe.