Rewrite code for appending path for sprockets