Fixed fog file extension method

When I upload a file using fog storage and then try to get the file's extension I get full file name when the file has no extension. This pull request fixes that problem.