Add a function to extract the extension from a file path