Build railroad tracks and cheat the government
Python, 307 chars

import os
I=os.read(0,99)
n=I.find('\n')+1
I='\0'*n+I+'\0'*n
def P(p):
 S=[]
 for d in(-n,-1,1,n):
  y=p[-1]+d
  if'E'==I[y]:S+=[(sum((int(I[v])-1)/3*75-15*int(I[v])+15for v in p[1:]),p)]
  if'0'&lt;I[y]&lt;':'and y not in p:S+=P(p+[y])
 return S
for i in max(P([I.find('S')]))[1][1:]:I=I[:i]+'#'+I[i+1:]
print I,


P takes a partial path p and returns all ways of extending it to reach E.  Each returned path is paired with its score so max can find the best one.

Takes about 80 seconds on a 6x6 map.