[Edit] The problem is BitDefender anti virus. I followed the instructions on how to install asp.net 5 beta 8. I was able to install all the necessary files without any problem.
So I've finally found the cause of the problem.
I have BitDefender anti virus installed on the computer which for some strange reason it is causing this behavior. As mentioned in the original post I did try disabling it but that didn't work. I had to completely uninstall the software :(
Waste of time :(