Reverted PR#1 as it had caused an issue when running within asp.net context, needs further investigating. Added some tests around this issue too to make sure file is downloaded and not just headers returned