Are you hiking the entire JMT over several weeks? I guess if it were me, I'd not want to have to worry about Lamisil pills while hiking (depending on how bad it is). I'd go see the doc before, get prescrip if he agrees it's fungus, get information on prevention, but wait to fill it until after I was back (if doc agrees you could wait). Let the doc know your plans of filling script after trips, if that is what you decide. As you probably know the pill treatment is 3 months.
What I would do for the trip though is use Lamisil cream every day to prevent skin involvement. I take it on all my hikes and use it daily.
There's nothing wrong with filing off bad nail, but be careful not to damage the skin and cause bacterial infection. In some cases the bad nail can be removed somewhat easily and then topicals can work. Without debridement of bad nail, topicals frequently won't work, in my opinion.
Maybe Doc Hurd (family practice I think) will respond.