Added extract function to bash

Attempts to extract a file from its given extension.