'Fetches the current extension of the path.
If the url does not end in a file or the file has no extension, returns
an empty string.'

def path_extension(self):

    filename = self.path.split('/')[(-1)]
    filename_parts = filename.split('.')
    if (len(filename_parts) == 1):
        return ''
    return filename_parts[(-1)]
