Added 0777 to open() as it would create CAPITAL filenames.... annoying!!!
Authored by: SumolX 2006-10-10
Parent: [r274]
Child: [r276]