auto-detect running from jar for approriate resource loading