merging creat and open function to be more pythonic

the os python module does not offer a creat function,
new files are created using the open function and
by passing O_CREAT flag. We are changing gfapi.py to
function the same way.

Change-Id: I5e084b200bb657e3124d3e620a47160e790cd1fe
Signed-off-by: Thiago da Silva <thiago@redhat.com>