adding support for theme templates to be merged and shown in page attributes

This should fix the problem when someone is trying to put a template from within a plugin to wp. With this fix the templates from the current theme are added to the array and will also work with the templates that where made in the plugin.