tabs -> spaces, fix for php's broken $_FILES array. added test as well