[CORE] Cut over to Path API for file deletion

Today we use the File API for file deletion as well as recursive
directory deletions. This API returns a boolean if operations
are successful while hiding the actual reason why they failed.
The Path API throws and actual exception that might provide better
insights and debug information.
Should it just catch IOException (as well as other places calling Files.delete)? Also why do you add a trailing space after the name of the plugin file?