Fix potential seg if someone doesn't specify an extension