Function to determine relative image path in some cases, addresses #203